﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.IDAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class MasterContactBankBLL : IBLLMasterContactBank
    {
        private static readonly IDALMasterContactBank dal = DataAccess.CreateMasterContactBank();

        public MasterContactBankBLL()
        {

        }

        public IList<MasterContactBankInfo> GetMasterContactBank()
        {
            return dal.GetMasterContactBank();
        }

        public IList<MasterContactBankInfo> GetMasterContactBank(string record_status)
        {
            return dal.GetMasterContactBank(record_status);
        }

        public MasterContactBankInfo GetMasterContactBank(int seq)
        {
            return dal.GetMasterContactBank(seq);
        }

        public IList<MasterContactBankInfo> GetMasterContactBankWithParent(int contact_seq)
        {
            return dal.GetMasterContactBankWithParent(contact_seq);
        }

        public void Insert(MasterContactBankInfo info)
        {
            try
            {
                dal.Insert(info);
            }
            catch
            {
                throw;
            }
        }

        public void Insert(IList<MasterContactBankInfo> infoList, int contact_seq, IDBManager dbManagerTrans)
        {
            try
            {
                dal.Insert(infoList, contact_seq, dbManagerTrans);
            }
            catch
            {
                throw;
            }
        }

        public void Update(MasterContactBankInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(MasterContactBankInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<MasterContactBankInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<MasterContactBankInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<MasterContactBankInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }
    }
}
